import { NavBar } from 'antd-mobile'
import style from './index.module.less'

function Main ({ children, title, onBack, right }) {
  return (
    <div className={style.contaienr}>
      <div className={style.nav}>
        <NavBar onBack={() => { onBack() }} right={right}>{title}</NavBar>
      </div>
      <div className={style.body}>
        <div className={style.inner}>
          {children}
        </div>
      </div>
    </div>
  )
}

export default Main
